home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / amos / amoslist-0195.lzh / AMOSLIST / text0080.txt < prev    next >
Encoding:
Text File  |  1995-02-01  |  1.2 KB  |  51 lines

  1. > In answering you question, I would like to see a function which allows 
  2. > the taking of noise levels from each of the 2 channels from a stereo 
  3. > sampler. This info would only need to be 2 numbers between 0 and 9, ie 
  4. > the volume of the noise being monitored at that point on each channel.
  5. > All you need have is a function call like eg :-
  6. > - var_name = ch_level_left
  7. >  
  8. > and var_name returned with a value between 0 and 9.
  9. > This would allow you to trigger sequences by real world noise events. 
  10. > eg burglar alarm - any sustained level of noise above the ave sound level 
  11. > (breaking windows, footsteps etc) can trigger an event ie an alarm.
  12. > Or you could use it to provide trippy visuals triggered in time to the 
  13. > beat of some music.
  14. > If this is possible, I will be one of the fisrt to buy it !!!
  15.  
  16. Try something like...
  17.  
  18. ' PAL overscan screen
  19. Screen Open 0,352,290,2,Lowres
  20. Screen Display 0,,30,,
  21. Hide On 
  22. Cls 0
  23. Circle 176,145,100 : Paint 176,145
  24. A=$BFE101 : AA=$BFE103
  25. THRESH=2
  26. '
  27. Amos To Front 
  28. Do 
  29.    S=Abs(Peek(A)-128)
  30.    SS=Abs(Peek(AA)-128)
  31.    If SS>THRESH
  32.       Colour 0,Rnd(4095) : Wait Vbl 
  33.       Fade 1 : Wait 5
  34.    End If 
  35.    If S>THRESH
  36.       Colour 1,Rnd(4095) : Wait Vbl 
  37.       Fade 1 : Wait 5
  38.    End If 
  39. Loop 
  40.  
  41.  
  42.  
  43. --
  44. Dominic Ramsey
  45.  
  46.